from rest_framework import viewsets

from apps.function.models import FunctionModel, FunctionDetailModel
from apps.function.serializers import FunctionSerializer, FunctionDetailSerializer


class FunctionViewSet(viewsets.ModelViewSet):
    queryset = FunctionModel.objects.all()
    serializer_class = FunctionSerializer


class FunctionDetailViewSet(viewsets.ModelViewSet):
    queryset = FunctionDetailModel.objects.all()
    serializer_class = FunctionDetailSerializer
